package com.authine.cloudpivot.ext.enums;

/**
 * 客户订单状态
 */
@Deprecated
public enum CustomerOrderStatusEnum {
    /**
     * 各节点状态修改(正向流程)
     * 1、客户下单->待付款
     */
    ALL(0, "全部"),
    NEW(1, "新建"),//审批中订单状态
    PAYMENT(2, "待付款"), //可付款订单状态
    PAID(3, "已付款"),
    RETURN(4, "退货"),
    CANCEL(5, "取消"),
    DONE(6, "已完成"),
    REJECTED(7, "已驳回");


    public Integer id;
    public String text;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    private CustomerOrderStatusEnum(Integer id, String text) {

        this.id = id;
        this.text = text;
    }

    public static CustomerOrderStatusEnum get(Integer code) {

        for (CustomerOrderStatusEnum c : CustomerOrderStatusEnum.values()) {
            if (c.id.toString().equals(code.toString())) {
                return c;
            }
        }
        return null;
    }

    @Override
    public String toString() {
        return text;
    }


}
